<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>魔兽世界服务器列表</title>
    <link href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/4.5.3/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <style>
        html,
        body {
            overflow-x: hidden; /* Prevent scroll on narrow devices */
        }

        body {
            background-color: #f8f9fa!important;
        }

        @media (max-width: 991.98px) {
            .offcanvas-collapse {
                position: fixed;
                top: 56px; /* Height of navbar */
                bottom: 0;
                left: 100%;
                width: 100%;
                padding-right: 1rem;
                padding-left: 1rem;
                overflow-y: auto;
                visibility: hidden;
                background-color: #343a40;
                transition-timing-function: ease-in-out;
                transition-duration: .3s;
                transition-property: left, visibility;
            }
            .offcanvas-collapse.open {
                left: 0;
                visibility: visible;
            }
        }

        .nav-scroller {
            position: relative;
            z-index: 2;
            height: 2.75rem;
            overflow-y: hidden;
        }

        .nav-scroller .nav {
            display: -ms-flexbox;
            display: flex;
            -ms-flex-wrap: nowrap;
            flex-wrap: nowrap;
            padding-bottom: 1rem;
            margin-top: -1px;
            overflow-x: auto;
            color: rgba(255, 255, 255, .75);
            text-align: center;
            white-space: nowrap;
            -webkit-overflow-scrolling: touch;
        }

        .nav-underline .nav-link {
            padding-top: .75rem;
            padding-bottom: .75rem;
            font-size: .875rem;
            color: #6c757d;
        }

        .nav-underline .nav-link:hover {
            color: #007bff;
        }

        .nav-underline .active {
            font-weight: 500;
            color: #343a40;
        }

        .text-white-50 { color: rgba(255, 255, 255, .5); }

        .bg-purple { background-color: #6f42c1; }

        .lh-100 { line-height: 1; }
        .lh-125 { line-height: 1.25; }
        .lh-150 { line-height: 1.5; }

        strong{
            font-size: 18px;
        }
        .adimg{
            width: 100%;
            height: auto;
            max-width: 1200px;
            max-height: 100px;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
<div class="container my-5">

    <div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
        <img class="mr-3" src="/icon/temp.png" alt="" width="48" height="48">
        <div class="lh-100">
            <h3 class="mb-0 text-white lh-100">魔兽世界服务器列表</h3>
            <small>World of Warcraft Server List</small>
        </div>
    </div>



    @include('layouts/adList')
    @if(sizeof($adList)==5)
        <div style="text-align: end; font-size: 14px">
            <a href="http://{{env('DOMAIN_MANAGE')}}/ads" target="_blank">更多服务广告 >></a>
        </div>
    @endif


    <small class="d-block text-right mt-3">
        <a href="http://{{env('DOMAIN_MANAGE')}}" target="_blank">魔兽世界服务端管理系统 >> </a>
    </small>

    <div class="my-3 p-3 bg-white rounded shadow-sm">
        @foreach($servers as $item)
        <div class="media text-muted pt-3">
            <img class="bd-placeholder-img mr-3 rounded" width="64" height="64" src="/icon/inv_letter_18.png" >
            <p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
                <strong class="d-block text-gray-dark"> <a target="_blank" href="http://{{$item->domain.'.'.config('conf.domain')}}">{{$item->name}}</a></strong>
                <small class="d-block text-right mb-1">
                    <a target="_blank" href="http://{{$item->domain.'.'.config('conf.domain')}}">进入</a>
                </small>
                {{ strip_tags( preg_replace('/<style\b[^>]*>(.*?)<\/style>/is', '', preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', '',$item->info)))}}
            </p>
            <div>
            </div>
        </div>
        @endforeach

        <small class="d-block mt-3">
            <div class="mt-3">
                {{ $servers->links() }}
            </div>
        </small>
    </div>

</div>


</body>
</html>
